function R = AIA_step2_R(I,Phi)
    R11 = sum(I(:),"omitnan");
    R12 = I.*cos(Phi);R12 = sum(R12(:),"omitnan");
    R13 = I.*sin(Phi);R13 = sum(R13(:),"omitnan");
    R = [R11, R12, R13];
    R = R';
end